x="外部的值"

def change():
    global x   # 函数内部的改变，影响到全局值
    x="内部改变了的值"
    print(x)

print(x)
change()
print(x)












# message="CSDN的Python挺好的！"
# print(message)

# def talk():
#     global message
#     message="这节作用域很重要"
#     print(message)

# talk()
# print(message)